<section class="scrollable padder-md" data-ng-controller="TripActivityCommonController">
    <section data-ng-controller="TripActivityEditController">
        <div class="m-b-md">
            <a href="" class="btn btn-rounded  btn-sm btn-icon btn-default pull-right" data-ng-click="close()">
                <i class="fa fa-reply"></i>
            </a>
            <h3 class="m-b-none text-black">
                <i class="fa fa-edit m-r-sm"></i>
                司机行程- {{tripActivity.name || '新增'}}
            </h3>
        </div>

        <section class="panel panel-default">
            <div class="panel-body">
                <form name="tripActivityForm" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            司机行程名：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control"> {{tripActivity.name}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            路线：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{tripActivity.route.name}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            出发地点：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{tripActivity.startSite}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            费用：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{tripActivity.route.cost}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            司机电话（账号）：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{tripActivity.driver.username}}</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            司机：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{tripActivity.driver.nickname}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            状态：
                        </label>
                        <div class="col-md-8">
                            <!--<select data-required="true"-->
                            <!--class="input-sm form-control"-->
                            <!--data-ng-model="tripActivity.state"-->
                            <!--data-ng-options="state.value as state.name for state in tripActivityStates">-->
                            <!--<option value="">&#45;&#45;状态&#45;&#45;</option>-->
                            <!--</select>-->
                            <span data-ng-class="getStateClass(tripActivity)">{{getStateName(tripActivity)}}</span>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            座位：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control"><span class="text-danger">{{tripActivity.maxSeat - tripActivity.activeSeat}}</span>/{{tripActivity.maxSeat}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            创建时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{tripActivity.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group" ng-show="tripActivity.state == -1">
                        <label class="col-md-3 control-label">
                            取消时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{tripActivity.cancelTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group" ng-show="tripActivity.state > 5 ">
                        <label class="col-md-3 control-label">
                            发车时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{tripActivity.startTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group" ng-show="tripActivity.state >= 20 ">
                        <label class="col-md-3 control-label">
                            到达时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{tripActivity.arriveTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group" ng-show="tripActivity.state > 30 ">
                        <label class="col-md-3 control-label">
                            支付时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control"> {{tripActivity.payTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>


                    <div class="form-group" ng-show="tripActivity.state >= 50 ">
                        <label class="col-md-3 control-label">
                            司机行程完成时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control"> {{tripActivity.completeTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            乘客司机行程订单：
                        </label>
                        <div class="col-md-8">
                            <table class="table table-striped b-t b-light">
                                <thead>
                                <tr>
                                    <th>司机行程名</th>
                                    <th>下单账号</th>
                                    <th>费用</th>
                                    <th>乘客数量</th>
                                    <th>乘客信息</th>
                                    <th>状态</th>
                                    <th class="col-md-2">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr data-ng-repeat="trip in tripActivity.trips">
                                    <td>{{trip.name}}</td>
                                    <td>{{trip.passenger.username}}</td>
                                    <td>{{trip.cost}}</td>
                                    <td>{{trip.seat}}</td>
                                    <td>
                                        {{trip.passenger.nickname}}
                                        <!--<div data-ng-repeat="tp in trip.tripPassengers">-->
                                        <!--{{tp.nickname}}-->
                                        <!--</div>-->
                                    </td>
                                    <td><span data-ng-class="getStateClass(trip)">{{getStateName(trip)}}</span></td>
                                    <td>
                                        <a href="javascript:void(0);" class="text-primary m-r-xs"
                                           data-ng-click="showTripDetail(trip.id)"><i
                                                class=""></i>查看详情</a>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>


                    <!--按钮-->
                    <div class="form-group text-right" style="margin-left: 15px; margin-right: 15px;">
                        <button type="button" class="btn btn-default" data-ng-click="close()">
                            <i class="i i-arrow"></i>
                            &nbsp;返回
                        </button>
                        <button type="submit" class="btn btn-success" data-ng-click="cancelTripActivity()">
                            <i class="fa fa-magic"></i>
                            &nbsp;取消司机行程
                        </button>
                        <!--<button type="submit" class="btn btn-success" data-ng-click="forceChangeSatate()">-->
                        <!--<i class="fa fa-flash"></i>-->
                        <!--&nbsp;强制修改状态-->
                        <!--</button>-->
                    </div>
                </form>
            </div>
        </section>
    </section>
</section>
